package tools

import (
	"github.com/go-playground/validator/v10"
	"regexp"
)

func Mobile(fl validator.FieldLevel) bool {
	r, _ := regexp.MatchString("0?(13|14|15|16|17|18|19)[0-9]{9}", fl.Field().String())
	return r
}

func Password(fl validator.FieldLevel) bool {
	value := fl.Field().String()
	if PasswordCheck(value) != nil {
		return false
	}
	return true
}
